package com.codingapi.demo.serverorder.hystrix;

import com.codingapi.demo.serverorder.feign.UserClient;
import com.codingapi.netflix.framework.Constants;
import com.codingapi.netflix.framework.exception.ServerFeignException;
import com.codingapi.swagger.response.JsonResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author modificial
 * @date 2018/7/27
 * @company codingApi
 * @description
 */
@Component
public class UserClientHystrix  implements UserClient {
    private static  final Logger LOGGER=LoggerFactory.getLogger(UserClientHystrix.class);
    @Override
    public JsonResult listUser() throws ServerFeignException {
        LOGGER.error("远程调用用户模块失败---");
        throw new ServerFeignException(Constants.GLOBAL_EXCEPTION_DEFAULT_CODE,"远程调用用户模块失败");
    }
}
